package lab01;

public class Test05 {
    public static void main(String[] args) {
        //for
        /*int i,sum=0;
        for(i=1;i<=20;i++) {
            sum += i;
        }
            System.out.println(sum);*/
        //while
       /*int i=1,sum=0;
        while(i<=20){
         sum+=i;
         i++;
        }
        System.out.println(sum);*/

       int i=1,sum=0;
       do{
           sum+=i;
           i++;
       }while(i<=20);
        System.out.println(sum);
    }
}
